package com.yj.rocketmq.producer.imp.sendmsghandler;

import com.yj.rocketmq.producer.AbstractMqProducer;
import com.yj.rocketmq.producer.AbstractMqSendMsgHandler;
import com.yj.rocketmq.producer.AbstractMqTransProducer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

@Slf4j
@Component
public class ProducerSendMsgHandler extends AbstractMqSendMsgHandler {

    @Autowired
    @Qualifier("rocketMqProducer")
    AbstractMqProducer rocketMqProducer;

    @Autowired
    @Qualifier("rocketMqTransProducerImpl")
    AbstractMqTransProducer rocketMqTransProducerImpl;

    @Override
    protected AbstractMqProducer getMqProducer() {
        return this.rocketMqProducer;
    }

    @Override
    protected AbstractMqTransProducer getMqTransProducer() {
        return rocketMqTransProducerImpl;
    }
}
